//
//  ERCustomAlertViewVC.h
//  EnjoyRunning
//
//  Created by ljm on 2017/4/24.
//  Copyright © 2017年 ljm. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ERCustomAlertView.h"

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSInteger, CustomAlertTransitionStyle) {  // 动画类型
    CustomAlertTransitionStyleFade = 0,
    CustomAlertTransitionStyleScaleFade,
    CustomAlertTransitionStyleDropDown,
    CustomAlertTransitionStyleCustom
};

typedef NS_ENUM(NSInteger, CustomAlertControllerStyle) {
    CustomAlertControllerStyleActionSheet = 0,
    CustomAlertControllerStyleAlert
};

@interface ERCustomAlertViewVC : UIViewController

@property (nonatomic, strong, readonly) UIView *alertView;
@property (nonatomic, assign, readonly) CustomAlertControllerStyle preferredStyle;
@property (nonatomic, assign, readonly) CustomAlertTransitionStyle transitionStyle;
@property (nonatomic, assign, readonly) Class transitionAnimationClass;

@property (nonatomic, strong) UIView *backgroundView;
@property (nonatomic, strong) UIColor *backgroundColor;
// 是否可以点击背景消失（默认为NO）
@property (nonatomic, assign) BOOL tapBackgroundDismissEnable;
// Default is 15
@property (nonatomic, assign) CGFloat alertStyleMargin;
// Default is 0
@property (nonatomic, assign) CGFloat actionSheetStyleMargin;
// Default centerY
@property (nonatomic, assign) CGFloat alertOriginY;


@property (nonatomic, copy) void(^dismissCompleteBlock)();

+ (instancetype)alertControllerWithAlertView:(UIView *)alertView;
+ (instancetype)alertControllerWithAlertView:(UIView *)alertView preferredStyle:(CustomAlertControllerStyle)preferredStyle;
+ (instancetype)alertControllerWithAlertView:(UIView *)alertView preferredStyle:(CustomAlertControllerStyle)preferredStyle transitionAnimationStyle:(CustomAlertTransitionStyle)transitionStyle;
+ (instancetype)alertControllerWithAlertView:(UIView *)alertView preferredStyle:(CustomAlertControllerStyle)preferredStyle transitionAnimationClass:(Class)transitionAnimationClass;

- (void)dismissViewControllerAnimated:(BOOL)animated;

@end

NS_ASSUME_NONNULL_END

